<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'gift_add.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

  </head>
   <script type="text/javascript">
 	function backToList(){
 	 	window.location.href = "/crm/gift/query";
 	}
  </script> 
  
    <style type="text/css">
  table{
  	border-collapse: collapse;
  }
  table th,table td{
  	border:1px solid black;
  }
  
  img{
  width: 100px;
  height: 50px;
  }
  </style>
  
  <body>
  <form action="/crm/gift/save" method="post" enctype="multipart/form-data">
    <table id="tt" class="easyui-datagrid" style="width:100%;height:auto" >
    <thead>
    <tr><th colspan="2">兑换礼品添加</th></tr>
    </thead>
  	  <tr>
  		<td>礼品名称：</td>
  		<td><input type="text" name="vGiftname"></td>
  	  </tr>
  	  <tr>
  		<td>礼品类别：</td>
  		<td>
  		<select name="vGifttype">
  		<c:forEach items="${type}" var="t">
			<option value="${t}">${t}
		</c:forEach>
		</select>
		</td>
  	  </tr>
  	  <tr>
  		<td>礼品库存：</td>
  		<td><input type="text" name="nNum"></td>
  	  </tr>
  	  <tr>
  		<td>单个所需积分：</td>
  		<td><input type="text" name="nSubs"></td>
  	  </tr>
  	  <tr>
  		<td>上传图片：</td>
  		<td><input type="file" name="vvFile" accept="image/jpg, image/jpeg" id="upload"></td>
  	  </tr>
  	  <tr>
			<td colspan="2">
				<div align="center">
					<input type="submit" value="立即提交"> <input type="button" onclick="backToList()" value="返回列表">
				</div>
			</td>
		</tr>
  	</table>
  	</form>
  </body>
</html>
